Skip to content

feat(users): add AchievementsController and GET /users/:id/achievements endpoint#114

Merged
phertyameen merged 2 commits intomainfrom
feat/addUserAchievement
Jul 26, 2025
Merged

feat(users): add AchievementsController and GET /users/:id/achievements endpoint#114
phertyameen merged 2 commits intomainfrom
feat/addUserAchievement

Conversation

@phertyameen
Copy link
Copy Markdown
Member

Description

This PR implements the AchievementsController to expose a new endpoint:

  • GET /users/:id/achievements: Returns the list of achievements unlocked by a user, including the achievement title, icon URL, and the timestamp when it was unlocked.

Changes

  • Created AchievementsController under users/controllers/
  • Injected AchievementsService to fetch achievements
  • Endpoint returns structured achievement data
  • Added unit tests for AchievementsService.findByUserId
  • Ensured proper typing and filtering of output

Example Response:

[
  {
    "id": "1",
    "title": "First Achievement",
    "iconUrl": "https://cdn.app/icons/first.svg",
    "unlockedAt": "2024-07-26T12:00:00.000Z"
  },
]
Ccloses issue #96 

@phertyameen phertyameen merged commit dc32f40 into main Jul 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant